import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

export const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home.vue'),
    meta: {
      title: '首页'
    }
  },
  {
    path: '/my-select-tree',
    name: 'my-select-tree',
    component: () => import('../views/my-select-tree/index.vue'),
    meta: {
      title: '树形下拉框'
    }
  },
  {
    path: '/my-all-cascader',
    name: 'my-all-cascader',
    component: () => import('../views/my-all-cascader/index.vue'),
    meta: {
      title: '全选级联选择器'
    }
  },
  {
    path: '/my-message',
    name: 'my-message',
    component: () => import('../views/my-message/index.vue'),
    meta: {
      title: '限制Message消息'
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
